<template>
    <view class="search-btn" @tap="toLink" v-if="visible">
        <image src="/static/icon/search.png" />
    </view>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
    computed: {
        ...mapGetters(['app']),

        visible() {
            return this.app == 'yzf';
        }
    },

    methods: {
        toLink() {
            this.$href('https://zfx.xmonecode.com/#/goods-search');
        }
    }
};
</script>

<style lang="scss" scoped>
.search-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 100;
    height: 60rpx;
    width: 60rpx;
    right: 0;
    top: 0;

    image {
        height: 34rpx;
        width: 34rpx;
    }
}
</style>
